package com.badminton.web.enums;

/**
 * @Author: peng.chen
 * @CreateTime: 2025-02-11
 * @Description: 标签枚举
 * @Version: 1.0.0
 */
public enum TagEnum {
    SEX("sex", "性别"),
    AGE("age", "年龄"),
    PROFICIENCY("proficiency", "熟练度"),
    FREE_TIME("freeTime", "空闲时间"),
    ;
    private String code;
    private String desc;

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    TagEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static TagEnum getTagEnumByCode(String code) {
        for (TagEnum tagEnum : TagEnum.values()) {
            if (tagEnum.getCode().equals(code)) {
                return tagEnum;
            }
        }
        return null;
    }
}
